package com.aioething.iot.beans;

import cn.hutool.core.date.DatePattern;

import java.text.SimpleDateFormat;

public interface SystemDefine {
    interface NodeType {
        Integer DIR = 1;
        Integer PAGE = 2;
        Integer PERMS = 3;
    }

    interface Role {
        String Platform = "PLATFORM";
        String Area = "AREA";
        String Agent = "AGENT";
        String ProjectMember = "PROJECT_MEMBER";
        String ProjectAdmin = "PROJECT_ADMIN";
        String Enterprise = "ENTERPRISE";
        String Supervise = "SUPERVISE";
    }

    interface TitleRule {
        Integer ByArea = 1;
        Integer Custom = 2;
    }

    enum ProjectStatus {
        RUNNING, // 运营中
        PRE_EXPIRE, // 即将到期
        EXPIRE, // 已到期
        STOP // 已终止
    }

    interface BusinessStatus {
        int Normal = 0; // 正常营业
        int Closure = 1; // 暂停营业
        int Close = 2;  // 倒闭
    }

    interface MenuSource {
        int PC = 1;
        int APP = 2;
    }

    interface RequestSource {
        int PC = 1;
        int APP = 2;
    }

    interface DataSource {
        String MYSQl = "mysql";
        String POSTGRESQL = "postgresql";
        String TDENGINE = "tdengine";
    }

    enum GongkStatus {
        BOTH_CLOSE, // 风机净化器都未开启
        ANY_OPEN, // 风机或净化器开启
        BOTH_OPEN // 风机和净化器都开启
    }

    interface MonitorStatus {
        int CJZ = 0;
        int WHZ = 1;
    }

    interface MonitorLevel {
        Integer YiBan = 0;
        Integer ChangTai = 1;
        Integer ZhongDian = 2;
    }

    interface DeviceStatus {
        int Normal = 0;
        int Warning = 1;
        int Alarm = 2;
        int Standby = 9;
        int Offline = 10;
        Integer All = null;
    }

    interface CaseProcessStatus {
        // 处理中
        int Processing  = 0;
        // 现场核查
        int Checking = 2;
        // 现场整改
        int Rectify = 3;
        // 整改查处
        int Rectify_Treat = 4;
        // 整改验收
        int Rectify_Check = 5;
        // 跟进处理
        int Follow_Up = 6;
        // 维修中
        int Repairing = 7;
        // 处罚中
        int Punishing = 8;
        // 结案
        int End = 10;
    }

    interface LicenseApplyStatus {
        Integer Address_Check = 0;
        Integer Site_Check = 1;
        Integer License_Check = 2;
        Integer End = 3;
    }

    interface CaseType {
        int Beyond = 1;
        int Offline = 2;
        int Complaint = 3;
        int Patrol = 4;
        int Patrol_Active = 5;
        int Punish = 6;
    }

    interface Source {
        int PC = 1;
        int APP = 2;
    }

    interface WorkOrderStatus {
        int INIT = 0;   // 初始
        int WAIT_HAND =1; // 待处理
        int HAND = 2; // 已处理
        int CLOSE = 3; // 已关闭
    }

    enum PowerType {
        AC_WIRED, // 市电
        UPS
    };

    interface ReportType {
        String Week = "week";
        String Month = "month";
    }

    String CODE_SUCCESS = "200";

    String SIM_SOURCE_DY = "DY";
    String SIM_SOURCE_QB = "QB";

    interface CardType {
        Integer SingleCard = 1;
        Integer PoolCard = 2;
    }

    interface Status {
        String Online = "online";
        String Offline = "offline";
    }

    interface Evnet {
        String CHAIXIE = "chaixie";
        String CHAIXIE_RECOVERY = "chaixie_recovery";
    }

    SimpleDateFormat SDF_DATE = new SimpleDateFormat(DatePattern.NORM_DATE_PATTERN);

    // 一小时的毫秒数
    long MS_OF_HOUR = 1000 * 60 * 60;
    // 一天的毫秒数
    long MS_OF_DAY = MS_OF_HOUR * 24;

    // 真
    String True = "1";
    // 假
    String False = "0";

    String ScaleEnum[] = {"小", "中", "大"};
}
